package com.igeek.service;

import com.igeek.dao.IUserDao;
import com.igeek.dao.UserDaoImpl;
import javafx.application.Application;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author jerry
 * @Company 极客营
 */
public class UserServiceImpl implements IUserService {
    //1.定义一个dao属性,给属性赋值，交给spring框架处理
    //spring框架在配置文件中找到要创建的dao，把他new出来
    private IUserDao iUserDao;
    //2.spring通过属性的setter方法给属性赋值
    public void setiUserDao(IUserDao iUserDao) {
        this.iUserDao = iUserDao;
    }

    @Override
    public void login() {
        System.out.println("UserServiceImpl-service层被调用了。。。");

        iUserDao.findByUsernameAndPassword();
    }
}
